package 原型模式Cloneable;

public class DeepMainClass {
	public static void main(String[] args) throws Exception {

		DeepPerson person1 = new DeepPerson();
		person1.setName("肖亦鸣");
		person1.setAge(21);
		System.out.println(person1);
		
		DeepPerson person2 = (DeepPerson) person1.deepClone();
		System.out.println(person1==person2);
		person2.setAge(22);
		System.out.println(person2);
		
		
		System.out.println(person1.getClass()==person2.getClass());
	
	}
}
